<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Document</title>
</head>
<body>
    <script>

        // 传统键值对 不支持 其他格式的 键名，只支持字符串或变量形式
        // let obj = {
        //     a:123,
        //     function(){}:666,
        //     123:"abc",
        //     undefined:88,
         //    {}:"obj"
        // }


        // map - 属性名 可以是任何类型的数据

        // Uncaught TypeError: object is not iterable (cannot read property Symbol(Symbol.iterator))
        // let m1 = new Map({a:12});

        let m1 = new Map([
            ["a",12],
            [function(){},666],
            [{},888],
            [123,"abc"]
        ])


        console.log(m1); //Map(1) {'a' => 12}





    </script>
</body>
</html>